Enhancing Symbolic Execution of Heap-based Programs with Separation Logic for Test Input Generation

نویسندگان

  • Long H. Pham
  • Quang Loc Le
  • Quoc-Sang Phan
  • Jun Sun
  • Shengchao Qin
چکیده

Symbolic execution is a well established method for test input generation. By taking inputs as symbolic values and solving constraints encoding path conditions, it helps achieve a better test coverage. Despite of having achieved tremendous success over numeric domains, existing symbolic execution techniques for heap-based programs (e.g., linked lists and trees) are limited due to the lack of a succinct and precise description for symbolic values over unbounded heaps. In this work, we present a new symbolic execution method for heap-based programs using separation logic. The essence of our proposal is the use of existential quantifiers to precisely represent symbolic heaps. Furthermore, we propose a context-sensitive lazy initialization, a novel approach for efficient test input generation. We show that by reasoning about the heap in an existential manner, the proposed lazy initialization is sound and complete. We have implemented our proposal into a prototype tool, called Java StarFinder, and evaluated it on a set of programs with complex heap inputs. The results show that our approach significantly reduces the number of invalid test inputs and improves the test coverage. ACM Reference Format: Long H. Pham, Quang Loc Le, Quoc-Sang Phan, Jun Sun, and Shengchao Qin. 2017. Enhancing Symbolic Execution of Heap-based Programs with Separation Logic for Test Input Generation. In Proceedings of ACM Conference, Washington, DC, USA, July 2017 (Conference’17), 11 pages. https://doi.org/10.1145/nnnnnnn.nnnnnnn

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Test Case Generation by Symbolic Execution: Basic Concepts, a CLP-Based Instance, and Actor-Based Concurrency

The focus of this tutorial is white-box test case generation (TCG) based on symbolic execution. Symbolic execution consists in executing a program with the contents of its input arguments being symbolic variables rather than concrete values. A symbolic execution tree characterizes the set of execution paths explored during the symbolic execution of a program. Test cases can be then obtained fro...

متن کامل

Implicit Dynamic Frames ( draft )

An important, challenging problem in the verification of imperative programs with shared, mutable state is the frame problem in the presence of data abstraction. That is, one must be able to specify and verify upper bounds on the set of memory locations a method can read and write without exposing that method’s implementation. Separation logic is now widely considered the most promising solutio...

متن کامل

Constraint-Based Program Reasoning with Heaps and Separation

This paper introduces a constraint language H for finite partial maps (a.k.a. heaps) that incorporates the notion of separation from Separation Logic. We use H to build an extension of Hoare Logic for reasoning over heap manipulating programs using (constraint-based) symbolic execution. We present a sound and complete algorithm for solving quantifier-free (QF) H-formulae based on heap element p...

متن کامل

A Constraint Solver for Heaps with Separation

This paper introduces a constraint language H for finite partial maps (a.k.a. heaps) that incorporates the notion of separation from Separation Logic. The motivation behind H is reasoning over heap manipulating programs using constraint-based symbolic execution. For this we present a modest extension of Hoare Logic that inherits many of the benefits from Separation Logic, such as local reasonin...

متن کامل

A Symbolic Execution Framework with Explicit Heaps and Separation

Program verification of heap properties is challenging. A promising approach is Separation Logic, which supports local reasoning over disjoint portions of the heap. In this paper, we propose a heap constraint language H that explicates the heap and incorporates separation. By explicating the heap, the language is more suitable for automatic symbolic execution. We show that this language can be ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1712.06025  شماره 

صفحات  -

تاریخ انتشار 2017